﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace KaroGame.FrontEnd.Menu
{
    public class NewGameMenu : IMenu
    {
        public NewGameMenu(SpriteFont font)
        {
            Title = "New Game";

            Elements = new List<MenuElement>();
            Rectangle rec;
            string title;

            title = "Player vs CPU";
            rec = new Rectangle(50, 120, (int)font.MeasureString(title).X, (int)font.MeasureString(title).Y);
            Elements.Add(new MenuElement(title, new Vector2(50, 120), MenuElementAction.PlrVsCpu, rec));

            title = "Player vs Player";
            rec = new Rectangle(50, 170, (int)font.MeasureString(title).X, (int)font.MeasureString(title).Y);
            Elements.Add(new MenuElement(title, new Vector2(50, 170), MenuElementAction.PlrVsPlr, rec));

            title = "CPU vs CPU";
            rec = new Rectangle(50, 220, (int)font.MeasureString(title).X, (int)font.MeasureString(title).Y);
            Elements.Add(new MenuElement(title, new Vector2(50, 220), MenuElementAction.CpuVsCpu, rec));

            title = "Return";
            rec = new Rectangle(50, 270, (int)font.MeasureString(title).X, (int)font.MeasureString(title).Y);
            Elements.Add(new MenuElement(title, new Vector2(50, 270), MenuElementAction.Return, rec));
        }

        #region IMenu Members

        public string Title { get; set; }

        public List<MenuElement> Elements { get; set; }

        #endregion
    }
}
